#-*-encoding=utf-8-*-
name=u'error_report'
title=u'故障报告流程'
description=u'这个对象记录错误报告'
fields=(
    TextLineField(
        description='',
        title=u'故障简述',
        validation_exp=u'',
        write_condition=u'',
        size=28,
        default_value_exp=u'""',
        name=u'title'
),
    TextField(
        rows=5,
        description='',
        title=u'故障详述',
        cols=10,
        validation_exp=u'',
        write_condition=u'',
        default_value_exp=u'""',
        name=u'description'
),
    TextField(
        rows=5,
        description=u'解决方案',
        title=u'解决方案',
        cols=30,
        validation_exp=u'',
        write_condition=u'',
        default_value_exp=u'""',
        name=u'solution'
),
    PersonSelectField(
        description='',
        title=u'负责处理人',
        validation_exp=u'',
        multiple_selection=False,
        selectable_object='persononly',
        write_condition=u'',
        default_value_exp=u'None',
        name=u'handler'
),
    TextField(
        rows=5,
        description='',
        title=u'故障原因',
        cols=10,
        validation_exp=u'',
        write_condition=u'',
        default_value_exp=u'""',
        name=u'reason'
),
    SingleSelectField(
        title=u'处理版本',
        vocabulary_exp=u'flowsettings["versions"]',
        limit=4,
        write_condition=u'',
        default_value_exp=u'""',
        name=u'version'
),
    SingleSelectField(
        title=u'所属模块',
        vocabulary_exp=u'flowsettings["modules"]',
        limit=4,
        write_condition=u'',
        default_value_exp=u'""',
        name=u'module'
),
    PersonSelectField(
        description='',
        title=u'验收人',
        validation_exp=u'',
        multiple_selection=False,
        selectable_object='persononly',
        write_condition=u'',
        default_value_exp=u'request.principal.id',
        name=u'validator'
),
    PersonSelectField(
        description='',
        title=u'抄送',
        validation_exp=u'',
        multiple_selection=True,
        selectable_object='persononly',
        write_condition=u'',
        default_value_exp=u'None',
        name=u'subscribers'
),
    SingleSelectField(
        description='',
        title=u'考核评分',
        validation_exp=u'',
        vocabulary_exp=u"['好','中','差']",
        limit=4,
        write_condition=u'',
        default_value_exp=u'""',
        name=u'score'
),
    TextField(
        rows=5,
        description='',
        title=u'验收情况',
        cols=10,
        validation_exp=u'',
        write_condition=u'',
        default_value_exp=u'""',
        name=u'check_result'
),
    FileField(
        description=u'故障相关的附件',
        title=u'附件',
        write_condition=u'',
        default_value_exp=u'[]',
        name=u'attach',
        container_exp=u"flowsettings['folder']"
),)

displayed_columns = [u'title', u'handler', u'module', u'version']
fields_validation_script=ur"""ITagsManager(sheet).addTag(sheet['version'], True)
ITagsManager(sheet).addTag(sheet['module'], True)"""
